//filename: t_main.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include "t_main.h"
#define DEBUG_LOG_ENABLE
#include "debug_log.h"

typedef unsigned char *byte_pointer;
void show_bytes(byte_pointer start, int len)
{
    int i;
    for (i = 0; i < len; i++) {
        printf(" %.2x", start[i]);
        printf("(%c)", start[i]);
    }
    printf("\n");
}


int main()
{
    menu();
    DEBUG_PRINT("debug information: %s", "hello debug");
    char *env_lang;
    if ((env_lang = getenv("LANG")) != NULL) {
	printf("ENV(LANG): %s\n", env_lang);
    } else {
	printf("unkonw: ENV(LANG)\n");
    }

    struct timeval tm1;
    unsigned int timeofday;
    timeofday = gettimeofday(&tm1, NULL);
    DEBUG_PRINT("%d", tm1.tv_sec);
    DEBUG_PRINT("%d", tm1.tv_usec);
    DEBUG_PRINT("%d", timeofday);
    timeofday = tm1.tv_sec + tm1.tv_usec;
    DEBUG_PRINT("%d", timeofday);
    srandom(timeofday);
    printf("%d\n", rand());

    exit(0);
}
